<style>
.slider_<{$widgets_id}>
.slider_<{$widgets_id}>,
.slider_<{$widgets_id}> .slider-item,
.slider_<{$widgets_id}> .slider-item img {width:<{if $setting.width !=0}><{$setting.width}><{else}>100%<{/if}>}
.slider_<{$widgets_id}>,
.slider_<{$widgets_id}> .slider,
.slider_<{$widgets_id}> .slider-item,
.slider_<{$widgets_id}> .slider-item img {height:<{$setting.height}>px;}
.slider_<{$widgets_id}> {position:relative;background-color:white;overflow:hidden;}
.slider_<{$widgets_id}> .slider-item {float:left;ovrflow:hidden;}
.slider_<{$widgets_id}> .slider-point {position:absolute;width:100%;bottom:<{$setting.padding}>px;left:0px;}
</style>
<div class="slider_<{$widgets_id}>">
    <div class="slider" id="J_slider_<{$widgets_id}>">
        <ul class="slider-list" style="translate3d:0px,0px,0px">
            <{foreach from=$data.pic item=parent key=parentId}>
            <li class="slider-item"><a href="<{$parent.linktarget}>"><img src="<{$parent.link}>" alt="<{$data.linkinfo}>" width="<{$setting.width}>" height="<{$setting.height}>" /></a></li>
            <{/foreach}>
        </ul>
    </div>
    <div class="slider-point">
        <{assign var=countnum value="1"}>
        <{foreach from=$data.pic item=parent name=name key=parentId}>
        <span class="trigger-item <{if $smarty.foreach.name.iteration == 1}> act<{/if}>"></span>
        <{/foreach}>
    </div>
</div>
<script type="text/javascript">
(function(){
/*图片滚动*/
var adSlider = $('#J_slider_<{$widgets_id}>');
var sl = adSlider.find('.slider-item').size();
var sw = adSlider.width();
var act = 0;
adSlider.find('.slider-item').css('width',sw);
adSlider.find('.slider-list').css({'width':sl * sw,'-webkit-transform':'translate3d(0px, 0px, 0px)'});
adSlider.swipeLeft(function(e){
if(act != sl - 1){
act = act + 1;
$(this).find('.slider-list').animate({
translate3d:0 - (sw * act)+'px,0px,0'
});
$($(this).next().find('span')[act]).addClass('act').siblings('.act').removeClass('act');
}
});
adSlider.swipeRight(function(e){
if(act != 0){
act = act - 1;
$(this).find('.slider-list').animate({
translate3d:0 - (sw * act)+'px,0px,0'
});
$($(this).next().find('span')[act]).addClass('act').siblings('.act').removeClass('act');
}
});
function autoslid (){
if(act < sl-1 || act==0){
act = act + 1;
}
else{
act = 0;
}
adSlider.find('.slider-list').animate({
translate3d:0 - (sw * act)+'px,0px,0'
});
$(adSlider.next().find('span')[act]).addClass('act').siblings('.act').removeClass('act');
}
var autoplay = setInterval(autoslid,3000);
/*图片滚动end*/
})(); 
</script>

